function myRequest(options) {
  let token = wx.getStorageSync('token');
  if (!options.url) {
    return false;
  }
  wx.request({
    url: options.url,         //地址
    data: options.data || {},  //请求参数，默认为空
    method: options.method || 'GET',    //请求方式
    header: {
      'X-Nideshop-Token': token
    },
    success: options.success,
    fail: options.fail
  })
}

module.exports = { myRequest: myRequest }